<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>make_inverse</title>
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../../index.html" title="Chapter 1. Geometry">
<link rel="up" href="../make.html" title="make">
<link rel="prev" href="make_3_3_coordinate_values.html" title="make (3 coordinate values)">
<link rel="next" href="make_zero.html" title="make_zero">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="make_3_3_coordinate_values.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../make.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_zero.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="geometry.reference.algorithms.make.make_inverse"></a><a class="link" href="make_inverse.html" title="make_inverse">make_inverse</a>
</h5></div></div></div>
<p>
            <a class="indexterm" name="idm45246434173712"></a>
Construct a box with inverse infinite coordinates.
          </p>
<h6>
<a name="geometry.reference.algorithms.make.make_inverse.h0"></a>
            <span class="phrase"><a name="geometry.reference.algorithms.make.make_inverse.description"></a></span><a class="link" href="make_inverse.html#geometry.reference.algorithms.make.make_inverse.description">Description</a>
          </h6>
<p>
            The make_inverse function initializes a 2D or 3D box with large coordinates,
            the min corner is very large, the max corner is very small. This is useful
            e.g. in combination with the expand function, to determine the bounding
            box of a series of geometries.
          </p>
<h6>
<a name="geometry.reference.algorithms.make.make_inverse.h1"></a>
            <span class="phrase"><a name="geometry.reference.algorithms.make.make_inverse.synopsis"></a></span><a class="link" href="make_inverse.html#geometry.reference.algorithms.make.make_inverse.synopsis">Synopsis</a>
          </h6>
<p>
</p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Geometry</span><span class="special">&gt;</span>
<span class="identifier">Geometry</span> <span class="identifier">make_inverse</span><span class="special">()</span></pre>
<p>
          </p>
<h6>
<a name="geometry.reference.algorithms.make.make_inverse.h2"></a>
            <span class="phrase"><a name="geometry.reference.algorithms.make.make_inverse.parameters"></a></span><a class="link" href="make_inverse.html#geometry.reference.algorithms.make.make_inverse.parameters">Parameters</a>
          </h6>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                    <p>
                      Type
                    </p>
                  </th>
<th>
                    <p>
                      Concept
                    </p>
                  </th>
<th>
                    <p>
                      Name
                    </p>
                  </th>
<th>
                    <p>
                      Description
                    </p>
                  </th>
</tr></thead>
<tbody><tr>
<td>
                    <p>
                      Geometry
                    </p>
                  </td>
<td>
                    <p>
                      Any type fulfilling a Geometry Concept
                    </p>
                  </td>
<td>
                    <p>
                      -
                    </p>
                  </td>
<td>
                    <p>
                      Must be specified
                    </p>
                  </td>
</tr></tbody>
</table></div>
<h6>
<a name="geometry.reference.algorithms.make.make_inverse.h3"></a>
            <span class="phrase"><a name="geometry.reference.algorithms.make.make_inverse.returns"></a></span><a class="link" href="make_inverse.html#geometry.reference.algorithms.make.make_inverse.returns">Returns</a>
          </h6>
<p>
            The constructed geometry, here: a box
          </p>
<h6>
<a name="geometry.reference.algorithms.make.make_inverse.h4"></a>
            <span class="phrase"><a name="geometry.reference.algorithms.make.make_inverse.header"></a></span><a class="link" href="make_inverse.html#geometry.reference.algorithms.make.make_inverse.header">Header</a>
          </h6>
<p>
            Either
          </p>
<p>
            <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
          </p>
<p>
            Or
          </p>
<p>
            <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">algorithms</span><span class="special">/</span><span class="identifier">make</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
          </p>
<h6>
<a name="geometry.reference.algorithms.make.make_inverse.h5"></a>
            <span class="phrase"><a name="geometry.reference.algorithms.make.make_inverse.example"></a></span><a class="link" href="make_inverse.html#geometry.reference.algorithms.make.make_inverse.example">Example</a>
          </h6>
<p>
            Usage of make_inverse and expand to conveniently determine bounding box
            of several objects
          </p>
<p>
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>

<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">box</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">point_xy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>

<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">;</span>

<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
<span class="special">{</span>

    <span class="keyword">typedef</span> <span class="identifier">model</span><span class="special">::</span><span class="identifier">d2</span><span class="special">::</span><span class="identifier">point_xy</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">point</span><span class="special">;</span>
    <span class="keyword">typedef</span> <span class="identifier">model</span><span class="special">::</span><span class="identifier">box</span><span class="special">&lt;</span><span class="identifier">point</span><span class="special">&gt;</span> <span class="identifier">box</span><span class="special">;</span>

    <span class="identifier">box</span> <span class="identifier">all</span> <span class="special">=</span> <span class="identifier">make_inverse</span><span class="special">&lt;</span><span class="identifier">box</span><span class="special">&gt;();</span>
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">dsv</span><span class="special">(</span><span class="identifier">all</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
    <span class="identifier">expand</span><span class="special">(</span><span class="identifier">all</span><span class="special">,</span> <span class="identifier">make</span><span class="special">&lt;</span><span class="identifier">box</span><span class="special">&gt;(</span><span class="number">0</span><span class="special">,</span> <span class="number">0</span><span class="special">,</span> <span class="number">3</span><span class="special">,</span> <span class="number">4</span><span class="special">));</span>
    <span class="identifier">expand</span><span class="special">(</span><span class="identifier">all</span><span class="special">,</span> <span class="identifier">make</span><span class="special">&lt;</span><span class="identifier">box</span><span class="special">&gt;(</span><span class="number">2</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">5</span><span class="special">,</span> <span class="number">6</span><span class="special">));</span>
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">dsv</span><span class="special">(</span><span class="identifier">all</span><span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>

    <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
          </p>
<p>
            Output:
          </p>
<pre class="programlisting">((1.79769e+308, 1.79769e+308), (-1.79769e+308, -1.79769e+308))
((0, 0), (5, 6))
</pre>
<h6>
<a name="geometry.reference.algorithms.make.make_inverse.h6"></a>
            <span class="phrase"><a name="geometry.reference.algorithms.make.make_inverse.see_also"></a></span><a class="link" href="make_inverse.html#geometry.reference.algorithms.make.make_inverse.see_also">See
            also</a>
          </h6>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
                <a class="link" href="../assign/assign_inverse.html" title="assign_inverse">assign_inverse</a>
              </li></ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2009-2021 Barend Gehrels,
      Bruno Lalande, Mateusz Loskot, Adam Wulkiewicz, Oracle and/or its affiliates<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="make_3_3_coordinate_values.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../make.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="make_zero.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
